import {
  request,
  requestSync
} from '@/utils/request'


export function companyGzhAdd(data) {
  return requestSync({
    url: '/companyGzh/add',
    method: 'post',
    data
  })
}

export function companyGzhInfo(companyGzhId) {
  return requestSync({
    url: '/companyGzh/info',
    method: 'post',
    params: {
      companyGzhId
    }
  })
}

export function companyGzhList() {
  return requestSync({
    url: '/companyGzh/list',
    method: 'post'
  })
}

export function companyGzhUpdate(data) {
  return requestSync({
    url: '/companyGzh/update',
    method: 'post',
    data
  })
}

export function companyGzhUpdateState(companyGzhId, state) {
  return requestSync({
    url: '/companyGzh/updateState',
    method: 'post',
    params: {
      companyGzhId,
      state
    }
  })
}

export function gzhGetToken(code) {
  return requestSync({
    url: '/gzh/getToken',
    method: 'post',
    params: {
      code
    }
  })
}
